Runs once, when the instance is made, after its variables are set (S2.9).
create: fires once, right after this instance’s variables are setThe first code that ever runs for an instance, once, right after the object's own settings (the sprite, mask, Visible, Solid and Persistent boxes of the object editor) have been put on it. Its x and y already hold the place it was made at. Anything a later event reads - a timer, a counter, which way this instance starts facing - belongs here, set once, rather than re-computed defensively every frame.
Create runs before this instance's first Step and before its first Draw, so it is always safe to assume Create has already happened by the time either of those read what it set. On room entry specifically, each placed instance is made and runs its Create, then that copy's own creation code (the code written for just that copy), and only once every placed instance has been made does the room's creation code run, and then Room Start. See When each event runs for the whole order, with a picture.
A bare assignment here is how an instance variable gets declared - the other way is inheriting one from a parent object (see Variables, types and scope for exactly how the two combine). A bare hp = 10; in Create creates the variable if nothing already declared it; the same bare name assigned anywhere else - Step, a Collision event, an Alarm - only ever uses a variable already declared by one of those two routes (its type is still free to come from anywhere, including refined later by a different event). A bare assignment to a name that is declared by neither is an error (typically a typo, like hitponts for hitpoints) rather than a silent second variable.
If one placed copy needs a different value from the rest, write it in that copy's own creation code (right-click the copy in the Room Editor and choose Instance Creation Code). That code runs after Create, so anything worked out from that value belongs there too, or later in Step or Draw.
This is the way to tell placed copies of one object apart - which of five braziers is lit at the start, which heart is worth two, which door a key opens, whether one lamp glows. Any number of copies can carry their own lines, and creation code may call any function an event can, such as shroud_cutout_sprite, so a copy can have its own glow, sprite, sound or path as well as its own numbers. Nothing else needs setting up: there is no separate list of per-copy values.
hp = 10;
facing = 0;Sets this instance's own starting health and facing once, before anything else about it runs.